import type { MusicData } from "@/types/music";
import type { getRecommendMusicResultItem } from "@/types/recommend";
import { defineStore } from "pinia";
import { ref, watch } from "vue";
export const useMusicStore = defineStore("music", () => {
  const musicData = ref<MusicData>({});
  const isPlayer = ref(false);
  const musicPicUrl = ref("");
  const getMusicLyric = ref("");
  const waitPlayMusic = ref<MusicData[]>([]);
  const waitMusicLyric = ref<string[]>([]);
  const waitMusicPic = ref<string[]>([]);
  const MusicHistory = ref<MusicData[]>([]);
  const MusicLyricHistory = ref<string[]>([]);
  const MusicPicHistory = ref<string[]>([]);
  const WaitMusicInfo = ref<getRecommendMusicResultItem[]>([]);
  const lastMusicInfo = ref<getRecommendMusicResultItem[]>([]);
  const pageThiefColor = ref("");
  return {
    musicData,
    isPlayer,
    musicPicUrl,
    getMusicLyric,
    waitPlayMusic,
    waitMusicLyric,
    waitMusicPic,
    MusicHistory,
    MusicLyricHistory,
    MusicPicHistory,
    WaitMusicInfo,
    lastMusicInfo,
    pageThiefColor,
  };
});
